home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / TCL1 / GRAPH_FO / (GRAPH / CGRAPHTE / CGRAPHTA.H < prev    next >
Text File  |  1991-02-15  |  1KB  |  44 lines

  1. /******************************************************************************
  2.  CGraphTask.h
  3.  
  4.         Interface for the GraphTask Class, a general class that handles
  5.         scrolling in  the Graph and sets some instance variables for
  6.         tracking, etc. Later extend to hanle Undo.
  7.  
  8.         Copyright ⌐ 1990 Maarten Meijer. All rights reserved.
  9.  
  10.  ******************************************************************************/
  11.  
  12. #define _H_CGraphTask
  13.  
  14. /* includes */
  15. #include <CMouseTask.h>                        /* Interface for its superclass        */
  16. #include <CPanorama.h>
  17. #include "Graph.h"
  18.  
  19. /* class definition */
  20. struct CGraphTask : CMouseTask {
  21.                             /** Instance Variables **/
  22.     CPanorama *    itsRama;
  23.     Graph *        itsGraph;
  24.     Point        itsStart, itsStop;
  25.     Boolean        notified;            /* Notified its supervisor */
  26.  
  27.                             /** Instance Methods **/
  28.                             /** Contruction/Destruction **/
  29.     void        IGraphTask(short aNameIndex, CPanorama *theRama,
  30.                             Graph *theGraph, Point from);
  31.     void        Notify();
  32.  
  33.                             /** Mouse Tracking **/
  34.     void        BeginTracking(Point *startPt);
  35.     void        KeepTracking(Point *currPt, Point *prevPt, Point *startPt);
  36.     void        EndTracking(Point *currPt, Point *prevPt, Point *startPt);
  37.                             /** Drawing the thing **/
  38.  
  39.     void        Draw(Point a, Point b);
  40.                             /** get some data **/
  41.     void        GetStop(Point *pt);
  42.     void        GetRect(Rect *result);
  43. };
  44.